package sinkdotcom1;

import java.util.Random;
import java.util.Scanner;

public class SimpleDotComTesteDrive {

    public static void main(String[] args) {

        int numberOfGuesses = 0;

        String guess;

        Scanner input = new Scanner(System.in);

        SimpleDotCom dot = new SimpleDotCom();

        Random NumInicial = new Random();
        NumInicial.nextInt(5);


        int[] locations = new int[2];
        locations[0] = NumInicial.nextInt(5);
        locations[1] = NumInicial.nextInt(5) + 1;
        locations[2] = NumInicial.nextInt(5) + 2;

        dot.setLocationsCells(locations);

        boolean isAlive = true;

        while (isAlive == true) {
            guess = input.next();
            dot.checkYourself(guess);
            numberOfGuesses++;
            if ("kill".equals(dot.checkYourself(guess))) {
                isAlive = false;
                System.out.println(numberOfGuesses);
            }
        }
    }
}
//String userGuess = "2";
//String result = dot.checkYourself(userGuess);